
#ifndef __PROTO_PACK_H__

#define __PROTO_PACK_H__

#include "base_proto.h"
#include "tlv_pack_item.h"

int proto_head_pack(struct tlv_buf_t *buf, struct proto_head_t *proto_head);
int proto_head_unpack(struct tlv_buf_t *buf, struct proto_head_t *proto_head);
int user_info_pack(struct tlv_buf_t *buf, struct user_info_t *user_info);
int user_info_unpack(struct tlv_buf_t *buf, struct user_info_t *user_info);
int group_info_pack(struct tlv_buf_t *buf, struct group_info_t *group_info);
int group_info_unpack(struct tlv_buf_t *buf, struct group_info_t *group_info);
int server_info_pack(struct tlv_buf_t *buf, struct server_info_t *server_info);
int server_info_unpack(struct tlv_buf_t *buf, struct server_info_t *server_info);
int proto_head_pack(struct tlv_buf_t *buf, struct proto_head_t *proto_head);;
int proto_head_unpack(struct tlv_buf_t *buf, struct proto_head_t *proto_head);
int proto_head_insert(struct tlv_buf_t *buf, struct proto_head_t *proto_head);

int press_info_pack(struct tlv_buf_t *buf, struct press_info_t *press_info);
int press_info_unpack(struct tlv_buf_t *buf, struct press_info_t *press_info);
int server_list_pack(struct tlv_buf_t *buf, struct server_list_t *server_list);
int server_list_unpack(struct tlv_buf_t *buf, struct server_list_t *server_list);
int user_register_req_pack(struct tlv_buf_t *buf, struct user_register_req_t *req);
int user_register_req_unpack(struct tlv_buf_t *buf, struct user_register_req_t *req);
int user_register_resp_pack(struct tlv_buf_t *buf, struct user_register_resp_t *resp);
int user_register_resp_unpack(struct tlv_buf_t *buf, struct user_register_resp_t *resp);
int user_login_req_pack(struct tlv_buf_t *buf, struct user_login_req_t *req);
int user_login_req_unpack(struct tlv_buf_t *buf, struct user_login_req_t *req);
int user_login_resp_pack(struct tlv_buf_t *buf, struct user_login_resp_t *resp);
int user_login_resp_unpack(struct tlv_buf_t *buf, struct user_login_resp_t *resp);
int user_logout_req_pack(struct tlv_buf_t *buf, struct user_logout_req_t *req);
int user_logout_req_unpack(struct tlv_buf_t *buf, struct user_logout_req_t *req);
int user_logout_resp_pack(struct tlv_buf_t *buf, struct user_logout_resp_t *resp);
int user_logout_resp_unpack(struct tlv_buf_t *buf, struct user_logout_resp_t *resp);
int user_add_req_pack(struct tlv_buf_t *buf, struct user_add_req_t *req);
int user_add_req_unpack(struct tlv_buf_t *buf, struct user_add_req_t *req);
int user_add_resp_pack(struct tlv_buf_t *buf, struct user_add_resp_t *resp);
int user_add_resp_unpack(struct tlv_buf_t *buf, struct user_add_resp_t *resp);
int user_kick_req_pack(struct tlv_buf_t *buf, struct user_kick_req_t *req);
int user_kick_req_unpack(struct tlv_buf_t *buf, struct user_kick_req_t *req);
int user_kick_resp_pack(struct tlv_buf_t *buf, struct user_kick_resp_t *resp);
int user_kick_resp_unpack(struct tlv_buf_t *buf, struct user_kick_resp_t *resp);
int user_upgrade_req_pack(struct tlv_buf_t *buf, struct user_upgrade_req_t *req);
int user_upgrade_req_unpack(struct tlv_buf_t *buf, struct user_upgrade_req_t *req);
int user_upgrade_resp_pack(struct tlv_buf_t *buf, struct user_upgrade_resp_t *resp);
int user_upgrade_resp_unpack(struct tlv_buf_t *buf, struct user_upgrade_resp_t *resp);
int user_info_req_pack(struct tlv_buf_t *buf, struct user_info_req_t *req);
int user_info_req_unpack(struct tlv_buf_t *buf, struct user_info_req_t *req);
int user_info_resp_pack(struct tlv_buf_t *buf, struct user_info_resp_t *resp);
int user_info_resp_unpack(struct tlv_buf_t *buf, struct user_info_resp_t *resp);
int group_create_req_pack(struct tlv_buf_t *buf, struct group_create_req_t *req);
int group_create_req_unpack(struct tlv_buf_t *buf, struct group_create_req_t *req);
int group_create_resp_pack(struct tlv_buf_t *buf, struct group_create_resp_t *resp);
int group_create_resp_unpack(struct tlv_buf_t *buf, struct group_create_resp_t *resp);
int group_delete_req_pack(struct tlv_buf_t *buf, struct group_delete_req_t *req);
int group_delete_req_unpack(struct tlv_buf_t *buf, struct group_delete_req_t *req);
int group_delete_resp_pack(struct tlv_buf_t *buf, struct group_delete_resp_t *resp);
int group_delete_resp_unpack(struct tlv_buf_t *buf, struct group_delete_resp_t *resp);
int group_join_req_pack(struct tlv_buf_t *buf, struct group_join_req_t *req);
int group_join_req_unpack(struct tlv_buf_t *buf, struct group_join_req_t *req);
int group_join_resp_pack(struct tlv_buf_t *buf, struct group_join_resp_t *resp);
int group_join_resp_unpack(struct tlv_buf_t *buf, struct group_join_resp_t *resp);
int group_quit_req_pack(struct tlv_buf_t *buf, struct group_quit_req_t *req);
int group_quit_req_unpack(struct tlv_buf_t *buf, struct group_quit_req_t *req);
int group_quit_resp_pack(struct tlv_buf_t *buf, struct group_quit_resp_t *resp);
int group_quit_resp_unpack(struct tlv_buf_t *buf, struct group_quit_resp_t *resp);
int group_upgrade_req_pack(struct tlv_buf_t *buf, struct group_upgrade_req_t *req);
int group_upgrade_req_unpack(struct tlv_buf_t *buf, struct group_upgrade_req_t *req);
int group_upgrade_resp_pack(struct tlv_buf_t *buf, struct group_upgrade_resp_t *resp);
int group_upgrade_resp_unpack(struct tlv_buf_t *buf, struct group_upgrade_resp_t *resp);
int group_info_req_pack(struct tlv_buf_t *buf, struct group_info_req_t *req);
int group_info_req_unpack(struct tlv_buf_t *buf, struct group_info_req_t *req);
int group_info_resp_pack(struct tlv_buf_t *buf, struct group_info_resp_t *resp);
int group_info_resp_unpack(struct tlv_buf_t *buf, struct group_info_resp_t *resp);
int msg_send_user_pack(struct tlv_buf_t *buf, struct msg_send_user_t *send_user);
int msg_send_user_unpack(struct tlv_buf_t *buf, struct msg_send_user_t *send_user);
int msg_receive_user_pack(struct tlv_buf_t *buf, struct msg_receive_user_t *receive_user);
int msg_receive_user_unpack(struct tlv_buf_t *buf, struct msg_receive_user_t *receive_user);
int msg_send_group_pack(struct tlv_buf_t *buf, struct msg_send_group_t *send_group);
int msg_send_group_unpack(struct tlv_buf_t *buf, struct msg_send_group_t *send_group);
int msg_receive_group_pack(struct tlv_buf_t *buf, struct msg_receive_group_t *receive_group);
int msg_receive_group_unpack(struct tlv_buf_t *buf, struct msg_receive_group_t *receive_user);
int user_friends_req_pack(struct tlv_buf_t *buf, struct user_friends_req_t *req);
int user_friends_req_unpack(struct tlv_buf_t *buf, struct user_friends_req_t *req);
int user_friends_resp_pack(struct tlv_buf_t *buf, struct user_friends_resp_t *resp);
int user_friends_resp_unpack(struct tlv_buf_t *buf, struct user_friends_resp_t *resp);
int user_groups_req_pack(struct tlv_buf_t *buf, struct user_groups_req_t *req);
int user_groups_req_unpack(struct tlv_buf_t *buf, struct user_groups_req_t *req);
int user_groups_resp_pack(struct tlv_buf_t *buf, struct user_groups_resp_t *resp);
int user_groups_resp_unpack(struct tlv_buf_t *buf, struct user_groups_resp_t *resp);
int group_users_req_pack(struct tlv_buf_t *buf, struct group_users_req_t *req);
int group_users_req_unpack(struct tlv_buf_t *buf, struct group_users_req_t *req);
int group_users_resp_pack(struct tlv_buf_t *buf, struct group_users_resp_t *resp);
int group_users_resp_unpack(struct tlv_buf_t *buf, struct group_users_resp_t *resp);
int server_reg_req_pack(struct tlv_buf_t *buf, struct server_reg_req_t *req);
int server_reg_req_unpack(struct tlv_buf_t *buf, struct server_reg_req_t *req);
int server_reg_resp_pack(struct tlv_buf_t *buf, struct server_reg_resp_t *resp);
int server_reg_resp_unpack(struct tlv_buf_t *buf, struct server_reg_resp_t *resp);
int agent_get_req_pack(struct tlv_buf_t *buf, struct agent_get_req_t *req);
int agent_get_req_unpack(struct tlv_buf_t *buf, struct agent_get_req_t *req);
int agent_get_resp_pack(struct tlv_buf_t *buf, struct agent_get_resp_t *resp);
int agent_get_resp_unpack(struct tlv_buf_t *buf, struct agent_get_resp_t *resp);
int dispatch_press_pack(struct tlv_buf_t *buf, struct dispatch_press_t *dispatch_press);
int dispatch_press_unpack(struct tlv_buf_t *buf, struct dispatch_press_t *dispatch_press);


#endif // __PROTO_PACK_H__
